room(0.1.0):
    description: You're in a large square room with grey walls. There is a
                 large mirror attached to one of the walls

                 $(require_here:note;There is a note on the floor.)$

                 $(require_here:box;There is a small box on the floor, in the
                 center of the room.)$

                 A south exit leads to the bicycle room. A north exit leads to
                 another room.
    items: box, note, mirror.1
    exits: south, north

item(mirror.1):
    on_examine: Hey, this is no regular mirror. Strange. When you first look at
                it, you see yourself and the walls behind you. But then,
                suddently the image changes. You see a street. Tall buildings.
                Cars. Many people. Shops. Bicycle riders. Huge advertisement
                signs on the buildings. You see this from the point of view of
                a person standing on the sidewalk, or perhaps at the entrace of
                some shop, and looking outside.

                That's not all. Some of the people passing by seem to ignore
                you, which makes sense, but many of them stare at you for a bit
                longer than you'd expect. Some of then even stop to stare at
                you for a few seconds, or move a hand through their hair while
                looking at you. Strange.

                After a while of seeing this view, the mirror goes back to
                showing you the boring walls behind you.
    on_break: Why? It's a nice mirror.
    on_kick: I suggest you don't. You could cut yourself, and you don't have a
             first aid kit.
    on_kiss: Come on, you're better than that. Or maybe you just happen to like
             mirrors? Okay, fine... there you go. Kissed that mirror. Happy
             now?

item(box):
    on_examine: It's a black, cube-shaped box. There seems to be no way to open
                it. On the top of the box there is a small red button.

                The box is tightly glued to the floor.
    on_press: You press the box's button. And... nothing exciting. It doesn't
              look like anything happened.#(pressed=1)#

item(note):
    on_examine: The note's paper is a bit yellow. The text, written in black,
                says:

                "The place you are exploring is an ancient maze, created by
                mysterious beings. Most chances, you were brought here by
                mistake. If that is the case, I'm sorry. It's unlikely you find
                the way out of here by yourself, but our ancient friends left
                us some help. However, read carefully before you attempt to use
                it!

                Hopefully, unless someone took it, there is a small box in this
                room. The button on the top of the box is your way out! If you
                press it, an exit door will be opened for you, several rooms
                ahead in the maze. It will take you back home to your normal
                life.

                In addition, near that exit door, a briefcase full of cash will
                be waiting. It should contain exactly 1 million dollars. You
                can count them to be sure.

                If you exit the maze with the money in your hands, you win the
                game.

                However, there is a catch. Our ancient friends made it so that
                if you press the button on that box, someone will die. Someone,
                somewhere. It is guaranteed that it will be someone you never
                met, and you wouldn't ever meet anyway. It will happen far away
                from your home, on the other side of the planet, and you'll
                never hear from anyone about this incident, ever. There is a
                chance that person will be a killer, but I'm not exactly sure
                about this detail, so I can't promise.

                Make a wise choice! Good luck!"
    allow_take: true

room(0.2.0):
    description: It's a kitchen. The equipment is rusty, and there's stench of
                 rotten food. There is also a table here.

                 There are north and south exits.
    items: table, glass, bread
    exits: south, north

item(table):
    on_examine: It's a wooden dining table for 6 people. There are signs of
                rot all over it.

                $(require_here:glass;There is a glass on the table, containing
                some transparent fluid.)$

                $(require_here:bread;There is a piece of old dry bread on the
                table.)$

item(glass):
    on_examine: It's a blue, partially transparent glass, made of glass.
                $(equals:drank,0;It contains a transparent fluid.)$
                $(equals:filled,1;It contains water. Hey! There's also a red
                key in there!)$
    on_smell: $(equals:drank,0;It has no smell, just like water. But perhaps
              poison has no smell either.)$
              $(equals:drank,1;No smell. The glass is empty.)$
    on_taste: $(equals:drank,0;You taste the liquid carefully. No taste.)$
              $(equals:drank,1;Nothing to taste, the glass is empty.)$
    on_drink: $(equals:drank,0;You drink the content of the glass. No smell, no
              taste. Just like water. Hopefully, this isn't poison.)$
              #(drank=1)#
              $(equals:drank,1;Nothing to drink, the glass is empty.)$
    allow_take: true

item(bread):
    on_examine: This is whole bread. Unlike white bread, this is actually
                healthy and full of nutrients. Did you know white flour was
                invented less than 200 years ago, just to help bakers make more
                money? But it's quite useless because it contains empty
                carbohydrates, i.e. nearly all the vitamins and minerals are
                missing from white bread. Unless you're starving, prefer whole
                bread.

                But this piece of bread here is hard as a rock and has green
                things on it. Must be years old.

                $(equals:wrapped,1;It's wrapped in some slightly yellow
                paper.)$
    on_smell: It smells like a combination of the regular smell of bread, and
              these green bacteria or whatever colony has developed on its
              surface. Overall, not too bad to eat it if really hungry.
    on_eat: Better this than die hungry, isn't it? Mmmmmmmm... can't. I can't
            chew it. Is this bread or a piece of rock? Maybe we can find
            something more closely resembling food.
    allow_take: true

room(0.3.0):
    description: This looks like a storage room. There are roughly twenty large
                 metal containers here. Maybe there are more behind them, it's
                 hard to see. All the containers look identical, except for two
                 which look special.

                 There are south and east exits.
    items: containers, blue_container, red_container, blue_lock, red_lock
    exits: south, east

item(containers):
    on_examine: There are many metal containers here, all roughly a meter wide
                and high. Most of them are dark green. But there is one blue
                container, and one red container.

item(blue_container):
    on_examine: It's a dark blue metal container, roughly a meter wide and a
                meter high.

                $(equals:lockb,1;It's locked with a huge thick blue metal
                lock.)$

                $(equals:lockb,0;It's open.)$

                $(require_here:right_wing;There's a wing here, specifically a
                right wing. Of the kind you can fly with.)$

item(red_container):
    on_examine: It's a dark red metal container, roughly a meter wide and a
                meter high.

                $(equals:lockr,1;It's locked with a huge thick red metal
                lock.)$

                $(equals:lockr,0;It's open.)$

                $(require_here:left_wing;There's a left wing here.)$

item(blue_lock):
    on_examine: It's a huge thick blue metal lock.
                $(equals:lockb,1;It's locked.)$
                $(equals:lockb,0;It's unlocked.)$
    on_lock: Can't, it's stuck. The mechanism is too old, or broken.

item(red_lock):
    on_examine: It's a huge thick red metal lock.
                $(equals:lockr,1;It's locked.)$
                $(equals:lockr,0;It's unlocked.)$
    on_lock: Can't, it's stuck. The mechanism is too old, or broken.

action(unlock_blue_lock):
    succeed: You unlock the blue lock, take it off the container and put it in
             your pocket. #(lockb=0)#
    require_here: blue_container
    require_inventory: blue_key
    equals: lockb,1
    gain: blue_lock
    drop: right_wing

action(unlock_red_lock):
    succeed: You unlock the red lock, take it off the container and put it in
             your pocket. #(lockr=0)#
    require_here: red_container
    require_inventory: red_key
    equals: lockr,1
    gain: red_lock
    drop: left_wing

item(right_wing):
    on_examine: It's a wing made of several large green leaves tied together
                using more green leaves. The leaves are dry, but somehow they
                are still green and the wing feels stable. Whoever made it must
                be a good wing-maker.

                This is a right wing, i.e. for holding or attaching to the
                right side of your body.
    allow_take: true

item(left_wing):
    on_examine: It's a wing made of several large green leaves tied together
                using more green leaves. The leaves are dry, but somehow they
                are still green and the wing feels stable. Whoever made it must
                be a good wing-maker.

                This is a left wing, i.e. for holding or attaching to the left
                side of your body.
    allow_take: true

room(1.3.0):
    description: You're in what seems to be a small tool storage room. There
                 are some rusty gardening tools here, attached to the wall.
                 $(require_here:shovel;A hoe, a rake and a shovel.)$
                 $(require_inventory:shovel;A hoe and a rake.)$

                 $(require_here:glove;There's also a gardening glove on the
                 floor, near the tools. Where is the other glove?)$

                 There are west and east exits. Bright light comes from the
                 east exit. There is also a hatch in the center of the room.
    items: hoe, rake, shovel, glove, hatch
    exits: west, east, down.5

item(glove):
    on_examine: It's a used gardening glove.

                You always wanted a nice garden, didn't you? The kids can play
                there, and you can read a good book, enjoying the sun and the
                wind and a grass. Hey, you can even grow some vegetables.
    allow_take: true

item(hatch):
    on_examine: $(equals:hatch,0;It's closed.)$
                $(equals:hatch,1;It's closed, but it's bent by a shovel stuck
                between the hatch door and floor.)$
                $(equals:hatch,2;It's open.)$
    on_open: $(equals:hatch,0; Ummm using what? There seems to be no handle or
             anything to pull.)$
             $(equals:hatch,1;You push down the shovel again. The hatch won't
             move.)$
             $(equals:hatch,2;It's already open.)$

action(open_hatch_using_shovel|open_hatch_with_shovel):
    succeed: You push the shovel between the hatch and the floor surrounding
             it, and push down the shovel's handle, hoping to push up the hatch
             to open it. It slightly bends as you push, but doesn't open.
             #(hatch=1)#
    fail: You need a closed hatch and a shovel for that.
    require_here: hatch
    equals: hatch,0
    require_inventory: shovel
    lose: shovel

action(kick_shovel):
    succeed: The hatch cracks open. You take back the shovel. #(hatch=2)#
    fail: Where? Which? Why? Please provide a detailed answer by e-mail.
    equals: hatch,1
    gain: shovel
    require_here: hatch

action(pull_shovel|push_shovel):
    succeed: You try pulling the shovel. You try pushing the shovel. The hatch
             door refuses to open.
    equals: hatch,1
    require_here: hatch

item(hoe):
    on_examine: Very rusty gardening hoe. Looks too heavy to carry around.

item(rake):
    on_examine: Very rusty gardening rake. Looks too heavy to carry around.

item(shovel):
    on_examine: Very rusty gardening shovel. Looks heavy, but could be useful.
    allow_take: true

exit(5):
    succeed: You carefully go down the stairs under the hatch.
    fail: Can't, the hatch is closed.
    equals: hatch,2

room(1.3.-1):
    description: You are in a basement. There's a horrible stench in the air.
                 There are spider webs everywhere, but you can't see any
                 spiders.

                 There is a large cabinet here. Made of dark wood. Looks
                 hand-crafted. There's space for at least 4 drawers in it, but
                 they're all missing, except for one. The top drawer is still
                 here.
    items: blue_key, drawer, oar
    exits: up

item(drawer):
    on_examine: This is a wide drawer.
                $(require_here:blue_key;There's a blue key in the drawer.)$
                $(require_here:oar;There's an oar here, fitting into the drawer
                tightly, because it's broken in 3 places.)$

item(blue_key):
    on_examine: A blue key.
    allow_take: true

item(oar):
    on_examine: It's an oar. People use these to steer boats.
                $(more_than:oarb,0;This oar, however, is broken.
                In !(oarb)! places.)$
    allow_take: true
